<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no, viewport-fit=cover">
    <!--    <meta content="telephone=no" name="format-detection">-->
    <meta name="google" value="notranslate">
    <meta name="root-url" value="">
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <meta property="title" content="">
    <meta property="key" content="">
    <meta property="description" content="">
    <title>合作码</title>
 <!--    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/app-base.css">
    <link rel="stylesheet" href="css/app-main.css"> -->
    <link rel="stylesheet" href="css/weui.min.css">
    <link rel="stylesheet" href="css/example.css">

    

    <style>
    .pro_type_grid .pro_item{
        width: calc(50% - .21rem * 2);
    }
    .header-search-txt{
        padding-left: 24px;
padding-right: 10px;
        width: 100%;
        background: #dddcdc;
       /* margin-left: 10px;
        margin-right: 10px;*/
        height: 25px;
        border-radius: 50px;
    }
    .page-header-background.header-title{
        text-align: center;
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        line-height: 44px;
    }
    .pro_item .cover .photo{
        height:30px !important
    }
    .pro_item .cover{
        text-align: center;
    }
    .pro_item .item_inner{
        display: grid;
        grid-template-rows: auto auto;
        margin-bottom: 5px;
        background: #fff;
        padding-top: 15px;
        padding-bottom: 15px;
        height: 55px;
    }
    .pro_item div{
        text-align: center;
        font-size: 13px;
    }
    body{
        background: #eee;
        height: 100%;
    }
    .pro_item{
        display: grid;
grid-template-columns: auto auto;
grid-column-gap: 5px;
    }
    .page-header-background.header-title{
        background: #40af41;
    }
    .p1{
        padding-left: 10px;
padding-right: 10px;
padding-bottom: 10px;
background: #fff;
padding-top: 6px;
margin-top: -6px;
    }
    .p2{
        margin-left: 10px;
margin-right: 10px;
font-size: 10px;
text-align: center;
margin-bottom: 10px;

    }
    .c1{
        color: #888;
    }
    .d3{
        margin-bottom: 10px;
margin-top: 10px;
    }
    .d4{
        text-align: center;
        margin-bottom: 30px;
   position: fixed;
bottom: 0px;
width: 100%;
    }
    .but-lx{
    border: none;
width: 70%;
background: #f08818;
color: #fff;
line-height: 30px;
  border-radius: 50px;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active{
    background: #40af41 !important;
}
.swiper-pagination-bullet{
    width: 5px !important;
height: 5px !important;
border-radius: 50px !important;
background: #888 !important;
}
.pp1{
    text-align: center;
color: #fff;
background: #40af41;
line-height: 44px;
font-size: 14px;
}
.pp2 img{
 width: 30px;
 height: 30px;
 margin-top: 10px;
}
.pp2{
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background: #cecbcb;
    text-align: center;
}
.pp3{
    display: grid;
grid-template-columns: auto 50px auto;
padding-top: 30px;
padding-bottom: 34px;
background: #fff;
}
.text{
    padding-top: 15px;
}
body{
    background: #cecece;
}
.ppi5 img{
    height: 20px;
    width: auto;
margin-top: 10px;
}
.ppi5 a{
    display: grid;
grid-template-columns: auto 15px;
line-height: 40px;
background: #fff;
margin-right: 10px;
margin-left: 10px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-color: #cecece;
}
.ppi5{
margin-top: 10px;
background: #fff;
margin-bottom: 10px;
}
.active .fb-user {
  background-position: -3.6rem 0 !important;
}
.fb.fb-user{
    background-image: url(../images/user1.png) !important;
    background-position: 0 0 !important;
}
.fb.fb-home{
    background-image: url(../images/home1.png) !important;
    background-position: 0 0 !important;
}
.nav-controller{
    color:#40af41 !important
}
.nav-controller.active{
    color:#888 !important
}
.d5{
    margin:20px;
    padding: 20px;
    background: #fff;
border-radius: 3px;
}
.fstitle{
font-size: 12px;
text-align: center;
color: #205521;
}
body{
    font-size: 12px;
}
.page{
background: #cecece !important;
}
#showTextToast{
    font-size: 12px !important;
    line-height:auto !important;
}
</style>


<script  src="js/_config.json"></script>
<script src="js/vue.min.js"></script>
<script src="js/vue-resource.min.js"></script>

</head>
<body ontouchstart>


<script type="text/javascript">window.__wxWebEnv&&(document.body.style.webkitTextSizeAdjust=JSON.parse(window.__wxWebEnv.getEnv()).fontScale+"%")</script>
    <span aria-hidden="true" id="js_a11y_comma" class="weui-hidden_abs">，</span>
    <div role="alert" class="weui-toptips weui-toptips_warn js_tooltips">错误提示</div>
    <div class="container" id="container"></div>
    <script type="text/html" id="tpl_home">


<div id="vue-main" class="page">
    <div class="page-header-background header-title">
        <a href="javascript:;" onclick="window.location.href=history.back(-1)"><div style="position: absolute;padding-top: 5px;padding-left: 5px;"><img style="height: 20px;" src="images/return.png"></div></a>
        <div>&nbsp;</div>
    </div>
   
    <div class="page__bd page__bd_spacing">
        <div></div>
        <a href="javascript:" role="button" style="background: #ff2b15c4;color: #fff;min-width: 100px;
max-width: 120px;
border-radius: 0px;top: 28px;" class="weui-btn weui-btn_default" @click="js_copy()" id="showTextToast">复制合作码</a>
        <div></div>
    </div>

    

    <!-- text toast -->
    <div role="alert" id="textToast" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast__wrp">
          <div class="weui-toast weui-toast_text">
              <p class="weui-toast__content">内容已复制</p>
          </div>
        </div>
    </div>
</div>

<script type="text/javascript">


    function call(r){
        var $textToast = $('#textToast');
        
        if ($textToast.css('display') != 'none') return;

        navigator.clipboard.writeText(r);
        $textToast.fadeIn(100);
        
        setTimeout(function () {
            $textToast.fadeOut(100);
        }, 1000);
    }


    $(function(){
        var $textToast = $('#textToast');
        $('#showTextToast').on('click', function(){
            if ($textToast.css('display') != 'none') return;
            let url=siteConfig.BaseUrl+'/h5/api/?url=hezuo';
            $.post(url,{
                uid:                localStorage.getItem("__token__")
            },function(res){
                call(res.data.code);
            })
                // navigator.clipboard.writeText("Hello World!!!");
                // $textToast.fadeIn(100);
                
                // setTimeout(function () {
                //     $textToast.fadeOut(100);
                // }, 1000);
        });
    });
</script>


<script>
    var vm = new Vue({
        el: '#vue-main',
        data() {
            return {
                code: ""
            }
        },
        created(){
           // let url=window.location.search;
           // let urlParams = new URLSearchParams(url);
           // this.searchkey = urlParams.get("key");
           // if(this.url==0){
           //     url=window.location.href;
           //    // window.location.href=url;
           // }
            
            

        },
        mounted(){
            
        },
        methods: {
           
            js_copy:function(){

                
                

                this.$http.post(siteConfig.BaseUrl+'/h5/api/?url=hezuo',{
                    token   :localStorage.getItem("__token__")
                },{emulateJSON: true}).then(function(res){
                    if (res.body.code==200) {
                        this.call(res.body.hcode);
                    }
                },function(){
                    console.log("request fail");
                })
            },
            call:function(r){
                var $textToast = $('#textToast');
                
                if ($textToast.css('display') != 'none') return;

                navigator.clipboard.writeText(r);
                $textToast.fadeIn(100);
                
                setTimeout(function () {
                    $textToast.fadeOut(100);
                }, 1000);
            }
        }
    })
    
</script>

<!-- <script src="https://weui.io/zepto.min.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="https://res.wx.qq.com/t/wx_fed/weui.js/res/1.2.17/weui.min.js"></script>
<script src="https://weui.io/example.js"></script>
<script src="https://weui.io/wah.js"></script>
<script type="text/javascript"></script> -->


<script src="js/zepto.min.js"></script>
        <script type="text/javascript" src="js/jweixin-1.0.0.js"></script>
        <script src="js/weui.min.js"></script>
        <script src="js/example.js"></script>
        <script src="js/wah.js"></script>
        <script type="text/javascript"></script>

<script type="text/javascript">function wxReady(e){"object"==typeof WeixinJSBridge&&"function"==typeof window.WeixinJSBridge.invoke?e():document.addEventListener("WeixinJSBridgeReady",e,!1)}wxReady(function(){WeixinJSBridge.invoke("getUserConfig",{},function(e){e.isCareMode&&document.body.setAttribute("data-weui-mode","care")})})</script>



</body>
</html>


